package com.waidi.clothespad.common;


import android.util.Log;

import org.json.JSONObject;

import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.util.ArrayList;

public class DpsOrderInfo {

    public static int standardLabourTime=180;
    public static  ArrayList<String>nameList = new ArrayList<>();
    public static ArrayList<NameType>nameTypeArrayList = new ArrayList<>();

    public static JSONObject switchData = new JSONObject();

    public static  ArrayList<String>urlList = new ArrayList<>();
    public static ArrayList<typeNameInfo>typeSizeNameInfo = new ArrayList<>();
    //工艺路线图详情
   // public static ArrayList<IcMesOrderProcessRouteMapInfo>icMesOrderProcessRouteMapInfoArrayList = new ArrayList<>();

    public static IcMesOrderProcessRouteMapInfo icMesOrderProcessRouteMapInfo= new IcMesOrderProcessRouteMapInfo();

    public static  int finishQty;
    public static  int id = 0 ;
    public static  String orderid ="";

    public static int orderNum = 0;
    public static long agreeData= 0;
    public static String comfort= "";
    public static String remark= "";
    public static String creator= "";
    public static String styNum= "";
    public static String styName= "";
    public static int isUrgent= 0;


    public static String csNum= "";
    public static String csName= "";
    public static int orderType= 0;
    public static String lineNum= "";

    public static int isZoom=0;
    public static String mainMaterial="";
    public static String color="";

    public static String orderSn="";
    public static String editor="";
    public static String editTime="";

    public static String version="";
    public static int status=0;

    public static String orderInfoPath=Config.Clothesath+"/dpsOrderInfo.txt";

    public DpsOrderInfo()
    {

/*      orderid = "";
        orderNum=0;
        agreeData=0;
        comfort ="";
        remark="";
        creator="";
        styNum="";
        styName="";
        isUrgent=0;
        csNum="";
        csName="";
        orderType=0;
        lineNum="";
        isZoom=0;
        mainMaterial="";
        color ="";
        orderSn="";
        editor="";
        editTime="";
        version="";
        status=0;*/
    }

    public final class typeNameInfo{
        public String qty ="";
        public String name ="";
        public typeNameInfo()
        {
            qty = "";
            name = "";
        }
    }

    public final class NameType
    {
        public String name;
        public String note;
        public String time;

        public NameType()
        {
            note = "";
            name = "";
            time="";
        }


    }


    public static void orderInfoWrite(String data)
    {
        try
        {
            File file0 = new File(orderInfoPath);
            if (!file0.exists())
            {
                Log.d("result", "create result:" +file0.toString()+":"+ file0.createNewFile());
            }
            OutputStream os = new FileOutputStream(orderInfoPath);
            byte [] bytes = data.getBytes("UTF-8");
            os.write(bytes,0,bytes.length);
            //关闭流
            os.flush();
            os.close();

        }catch (Exception e)
        {
            e.printStackTrace();
        }


    }



}
